*****************************
*
*  Descriptive Statistics 
*
*****************************


cd "..."

use data.dta, clear


* Table 2: club membership 
****************************

* all MPs on Oct 1, 1848
tab alt if okt_best==1

* only MPs included in analysis
tab alt if okt_best==1 & auswahl == 1


* Duncan Dissimilarity index reported the main text
display (abs(42/506-50/559) + abs(45/506-51/559) + abs(38/506-46/559) ///
	+ abs(35/506-37/559) + abs(34/506-38/559) + abs(41/506-42/559) ///
	+ abs(126/506-128/559) + abs(41/506-42/559) + abs(104/506-125/559))/2


	
* Table SI-1: descriptive statistics of explanatory variables
***************************************************************

tabstat okt_best idist_b_med_aug_part idist_b_med_aug_kpart d_alter ///
	ant_eigReg ant_eigKonf ant_eigStand ant_eigBeruf ant_eigParlAmt ///
	ant_eigPolAmt ant_eigVorp ant_eigVerein ant_eigStrafe if auswahl==1, ///
	stats(n mean sd min max) col(stats) format(%9.2f)


* correlation of variables reported in Note 15
pwcorr okt_best idist_b_med_aug_part idist_b_med_aug_kpart d_alter ///
	ant_eigReg ant_eigKonf ant_eigStand ant_eigBeruf ant_eigParlAmt ///
	ant_eigPolAmt ant_eigVorp ant_eigVerein ant_eigStrafe if auswahl==1, ///
	obs sig

	
	
* Figure 1: estimated ideal points by club membership
*******************************************************

#delimit; 

twoway 

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==0, area(42)
text(500 -.37 "Donnersberg", place(c) size(small)) ||  

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==1, area(45)
text(180 -.32 "Deutscher Hof", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==2, area(38)
text(140 -.21 "Westendhall", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==3, area(35)
text(230 -.165 "Württemberger Hof", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==4, area(34)
text(110 .08 "Augsburger Hof", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==5, area(41)
text(150 .13 "Landsberg", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==6, area(126)
text(500 .17 "Casino", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==7, area(41)
text(80 .37 "Milani", place(c) size(small)) ||

kdensity idpt_aug if okt_best==1 & auswahl==1 & alt==8, area(104)
text(250 .10 "unaffiliated", place(c) size(small))

aspect(0.5) legend(off) xlabel(-.5 .5, labsize(small))
yscale(off) plotregion(lcolor(none) margin(l=0 r=0)) 
xtitle("Ideological Position of MP")
note("IDEAL estimation based on 20 RCV until Aug 10, 1848 (Jackman 2008)" " " 
"Party affiliation of MPs as of October 1, 1848. Thus, estimates reflect MPs’ 
ideology at a time when some" "of the parties did not yet exist.")
scheme(s1mono) ;  

#delimit cr

graph export ideology_by_party.emf, replace
